(buf_bytepos_to_charpos): Fix mixup introduced in commit b300052fb4ef
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 27 Jun 2024 19:36:28 +0000 (15:36 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 6 Jul 2024 19:07:06 +0000 (15:07 -0400)
commit83234cc1dbbe19450d2fc8cc27509ee4b05c4877
tree2afe3ddad3e57ac39d9bd6f2e74df2238a37c852
parent48f4c9cbbc1297eeb2299928bd415c891b98d999
(buf_bytepos_to_charpos): Fix mixup introduced in commit b300052fb4ef

Backport of commit 1b595b4598e7 since it turns out this "minor typo"
had disastrous consequences in pathological cases and explains
some of the problems seen in bug#71644 and bug#63040.

* src/marker.c (buf_bytepos_to_charpos): Don't compare byte-positions
with char-positions.
src/marker.c